<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Star(){

        }
        // Star.prototype.sing = function(){
        //     console.log('唱歌');
        // }
        // Star.prototype.dance = function(){
        //     console.log('跳舞');
        // }

        Star.prototype = {
            //重新指回创造这个原型对象的构造函数
            constructor: Star,
            sing: function(){
                console.log('唱歌');
            },
            dance: function(){
                console.log('跳舞');
            }
        }
        console.log(Star.prototype);
        // const zs = new Star()
        // console.log(Star.prototype);
    </script>
</body>
</html>